﻿using Stardust.Common.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Stardust.Common.Model
{
    public class ServerNodeModel
    {
        public long Id { get; set; }
        public string ServiceName { get; set; }
        public string Address { get; set; }
        public string Version { get; set; }
        public ServerNodeStatus Status { get; set; }
        public double Weight { get; set; }
        public double DynamicWeight { get; set; }
        public DateTime HeartbeatTime { get; set; }

        public string GetServiceUrl(string controllerName, string actionName)
        {

            return "http://" + Address + "/stardust/" + controllerName + "/" + actionName;

        }
    }
}
